package cn.zn.modules.zzsys.inter.vo;

import cn.hutool.core.util.StrUtil;
import cn.zn.framework.common.vo.FinanceValues;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author ZN
 */
@Data
public class TeacherInfoVO {
    private String id;
    private String name;
    private String namePy;
    private String workNo;
    private String confirmImgPath;
    private String signImgPath;

    @JsonIgnore
    private FinanceValues financeValues;
    public TeacherInfoVO(FinanceValues financeValues){
        this.financeValues = financeValues;
    }

    /**
     * 确认字模查看路径
     *
     * @return
     */
    public String getConfirmImgViewPath() {
        if (StrUtil.isNotEmpty(this.confirmImgPath)) {
            return financeValues.getFile().getDomain().concat(this.confirmImgPath);
        }
        return "";
    }

    /**
     * 签名字模查看路径
     *
     * @return
     */
    public String getSignImgViewPath() {
        if (StrUtil.isNotEmpty(this.signImgPath)) {
            return financeValues.getFile().getDomain().concat(this.signImgPath);
        }
        return "";
    }
}
